Skip to content

All: upgrade relevanssi plugin #441

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

Conversation

timmywil
Copy link
Member

@timmywil timmywil commented Jun 28, 2023

I hit an error when attempting to run grunt deploy on some sites. WPLANG wasn't always defined. Fortunately, the error was fixed upstream.

I've upgraded the plugin to it's latest 3.x version. 4.x may work fine, but I didn't want to deal with breaking changes just yet. It does note a requirement of PHP 5.6, but I realized I've been running all sites on php version 8.2.7. I think we could upgrade all machines to at least 5.6. If that's not the case, there's also the possibility that the php 5.6 requirement set by relevanssi may not indicate earlier versions would have problems because before that they had not set a php requirement at all.

Copy link
Member

@mgol mgol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change is probably fine but is this our code or vendor one? If vendor one then it's best to avoid modifying this unless we confirm the latest version doesn't have this issue. Otherwise, we can bring some issues back just by upgrading dependencies.

Also, if this is a vendor file, it'd be good to add a marker comment for our modification - and maybe leave the code commented out to see the original.

@timmywil
Copy link
Member Author

Now that you say that, I'm not sure. I thought we wrote all the plugins.

@timmywil
Copy link
Member Author

timmywil commented Jul 3, 2023

Thanks, it seems this has been fixed upstream through the use of a defined check.

@timmywil
Copy link
Member Author

timmywil commented Jul 3, 2023

Is there a reason you linked 3.5.9? I understand not wanting to do a major version upgrade to latest (4.20.0), but the latest 3.x is 3.6.2 (or possibly "3.6.2.2")

@Krinkle
Copy link
Member

Krinkle commented Jul 3, 2023

I linked 3.5.9 as being the closest to the version we currently have. We wanted to link to relevanssi 3.3.8, which is what we have (per readme.txt), but that version isn't present in the canonical upstream repo. 3.5.9 is the oldest/closest I found.

I agree that in terms of upgrade, I suggest moving to the latest 3.x.

The full 3.x changelog is available at https://github.com/msaari/relevanssi/blob/3.6.2.2/readme.txt#L270-L420. Note that the old servers currently run WordPress 4.5 and PHP 5.4.

The 3.6.2.2 readme actually says it requires "PHP 5.6" (or later), so we may need to move to an older intermediate version first, or apply a manual patch, until we're fully on the new servers with WordPress 6.2 and PHP 7.4.

@timmywil
Copy link
Member Author

timmywil commented Jul 3, 2023

It looks like the php requirement wasn't set at all until version 3.6. PHP 5.6 may be an arbitrary restriction.

- this also fixes an error deploying some sites when WP_LANG
  in stopwords.php was not defined globally.:
@timmywil timmywil changed the title All: remove check of possibly undefined global variable All: upgrade relevanssi plugin Jul 4, 2023
Krinkle added a commit that referenced this pull request Jul 4, 2023
Ease upgrades by proactively checking against the required PHP version.

Ref #441.
Krinkle added a commit that referenced this pull request Jul 4, 2023
Ease upgrades by proactively checking against the required PHP version.

Ref #441.
Krinkle added a commit that referenced this pull request Jul 4, 2023
Ease upgrades by proactively checking against the required PHP version.

Ref #441.
@Krinkle Krinkle closed this Jul 4, 2023
@Krinkle Krinkle reopened this Jul 4, 2023
@Krinkle
Copy link
Member

Krinkle commented Jul 4, 2023

Re-opening to trigger the new PHP 5.4 lint job, just in case :)

@Krinkle
Copy link
Member

Krinkle commented Jul 6, 2023

I updated the commit message to explicitly reference the source zip URL, and confirmed that rm -rf relevanssi; curl … | tar -xz -z; mv relevanssi-* relevanssi leaves no difference with this patch.

Merged in 78880cd.

@Krinkle Krinkle closed this Jul 6, 2023
@timmywil timmywil deleted the stopwords branch July 6, 2023 18:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants